package com.applcn.goods.controller.seller;

import com.applcn.core.base.Result;
import com.applcn.goods.dto.PublishGoodsDTO;
import com.applcn.goods.service.GoodsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * com.applcn.goods.controller
 * Description:
 *
 * @author: 大妖怪
 * @date: 2020-02-13 00:43
 */
@RestController
@RequestMapping("/api/goods")
@RequiredArgsConstructor
public class GoodsController {

    private final GoodsService goodsService;

    /**
     * 发布商品
     *
     * @param dto
     * @return
     */
    @PostMapping("/publishGoods")
    public Result publishGoods(@RequestBody PublishGoodsDTO dto) {
        return goodsService.publishGoods(dto);
    }
}
